﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [Table("salary_promote_detail"), DataContract]
    public class SalaryPromoteDetail
    {
        [DataMember, Column("spd_seq"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int SpdId { get; set; }

        [ForeignKey("SalaryPromote"), DataMember, Column("sp_seq")]
        public int SpId { get; set; }
        
        [ForeignKey("Position"), DataMember, Column("pos_seq")]
        public int PosId { get; set; }

        [ForeignKey("Employee"), DataMember, Column("emp_seq")]
        public int EmpId { get; set; } 

        [DataMember, Column("old_salary")]
        public decimal OldSalary { get; set; }

        [DataMember, Column("new_salary")]
        public decimal NewSalary { get; set; }  
        
        [DataMember]
        public Position Position { get; set; }

        [DataMember]
        public Employee Employee { get; set; }

        [DataMember]
        public SalaryPromote SalaryPromote { get; set; }
    }
}
